package com.info.zhiduoduo.repository.mapper.evaluate;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.info.zhiduoduo.repository.entity.evaluate.EvaluateNotice;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author cuichenglong
 * @since 2020-12-23
 */
public interface EvaluateNoticeMapper extends BaseMapper<EvaluateNotice> {

    @Select(" select * from zdd_evaluate_notice " +
            " WHERE createtime between #{startDate} and #{endDate} " +
            " AND IF(ISNULL(#{title}) OR #{title} = '', 1=1, evaluate_title LIKE '%${title}%') " +
            " order by createtime desc")
    List<EvaluateNotice> queryEvaluateNoticeList(@Param("title") String title, @Param("startDate") Date startDate,
                                                 @Param("endDate") Date endDate);

}
